import type { PageSiderMenuGroup } from "@/pages/main/config/types.ts";
import { hci } from "@/components/framework/icon";
import { hc } from "@/framework/vue/util/render.ts";
import {
  CalculatorOutlined,
  ClockCircleOutlined,
  FieldBinaryOutlined,
  GlobalOutlined,
  IdcardOutlined,
  LinkOutlined,
  LockOutlined,
  SortAscendingOutlined,
} from "@ant-design/icons-vue";

export const toolsMenuItems: PageSiderMenuGroup[] = [
  {
    key: "dev",
    name: "开发",
    type: "group",
    children: [
      {
        key: "maven-search",
        name: "Maven仓库查询",
        icon: hci("icon-maven2"),
        component: () => import("./dev/maven-search/maven-search.vue"),
      },
      {
        key: "npm-search",
        name: "npm包查询",
        icon: hci("icon-npm"),
        component: () => import("./dev/npm-search/npm-search.vue"),
      },
      {
        key: "crontab",
        name: "Cron表达式生成",
        icon: hc(ClockCircleOutlined),
        component: () => import("./dev/crontab-generator/crontab-generator.vue"),
      },
      {
        key: "chmod-calculator",
        name: "Chmod计算器",
        icon: hc(CalculatorOutlined),
        component: () => import("./dev/chmod-calculator/chmod-calculator.vue"),
      },
      {
        key: "random-port",
        name: "随机端口生成",
        icon: hci("icon-port"),
        component: () => import("./dev/random-port/random-port.vue"),
      },
    ],
  },
  {
    key: "web",
    name: "Web",
    type: "group",
    children: [
      {
        key: "url-parser",
        name: "URL解析器",
        icon: hc(LinkOutlined),
        component: () => import("./web/url-parser/url-parser.vue"),
      },
      {
        key: "mimetype",
        name: "MimeType查询",
        icon: hc(GlobalOutlined),
        component: () => import("./web/mimetype/mimetype.vue"),
      },
      {
        key: "keycode",
        name: "KeyCode查询",
        icon: hci("icon-keyboard"),
        component: () => import("./web/keycode/keycode.vue"),
      },
    ],
  },
  {
    key: "encrypt",
    name: "加密",
    type: "group",
    children: [
      {
        key: "uuid",
        name: "UUID生成器",
        icon: hci("icon-uuid"),
        component: () => import("./encrypt/uuid-generator/uuid-generator.vue"),
      },
      {
        key: "ulid",
        name: "ULID生成器",
        icon: hc(SortAscendingOutlined),
        component: () => import("./encrypt/ulid-generator/ulid-generator.vue"),
      },
      {
        key: "en-decrypt",
        name: "加密/解密文本",
        icon: hc(LockOutlined),
        component: () => import("./encrypt/crypto-text/crypto-text.vue"),
      },
      {
        key: "rsa-key-pair",
        name: "RSA密钥对生成器",
        icon: hc(IdcardOutlined),
        component: () => import("./encrypt/rsa-key-pair-generator/rsa-key-pair-generator.vue"),
      },
    ],
  },
  {
    key: "converter",
    name: "转换器",
    type: "group",
    children: [
      {
        key: "base64-str",
        name: "Base64字符串编解码",
        icon: hc(FieldBinaryOutlined),
        component: () => import("./converter/base64-string-converter/base64-string-converter.vue"),
      },
    ],
  },
  {
    key: "text",
    name: "文本",
    type: "group",
    children: [
      {
        key: "text-stats",
        name: "文本统计",
        icon: hci("icon-text-stats"),
        component: () => import("./text/text-stats/text-stats.vue"),
      },
      {
        key: "ascii-art",
        name: "ASCII艺术字生成",
        icon: hci("icon-ascii"),
        component: () => import("./text/ascii-art-generator/ascii-art-generator.vue"),
      },
      {
        key: "article",
        name: "狗屁不通文章生成",
        icon: hci("icon-text-edit"),
        component: () => import("./text/bullshit-generator/bullshit-generator.vue"),
      },
    ],
  },
  {
    key: "misc",
    name: "其他",
    type: "group",
    children: [
      {
        key: "yes-or-no",
        name: "Yes or No",
        icon: hci("icon-yes-no"),
        component: () => import("@/modules/tools/misc/yes-or-no/yes-or-no.vue"),
      },
      // {
      //   key: "chishenme",
      //   name: "吃什么",
      //   icon: hci("icon-yes-no"),
      //   component: () => import("@/modules/tools/misc/yes-or-no/yes-or-no.vue"),
      // },
    ],
  },
];
